const o = {};
console.log(Object.isExtensible(o)); // true
o.x = 1;
console.log(o); // { x: 1 }
Object.preventExtensions(o);
// o.y = 2; // TypeError: Cannot add property, object is not extensible
